package com.ls.knowledge.llm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ls.knowledge.llm.entity.ChatConversationMessage;
import com.ls.knowledge.llm.mapper.ChatConversationMessageMapper;
import com.ls.knowledge.llm.service.ChatConversationMessageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ls
 * @since 2025-07-04
 */
@Service
public class ChatConversationMessageServiceImpl extends ServiceImpl<ChatConversationMessageMapper, ChatConversationMessage> implements ChatConversationMessageService {


    @Override
    public List<ChatConversationMessage> getConversationMessage(String conversationUuid) {
        List<ChatConversationMessage> messages = lambdaQuery().eq(ChatConversationMessage::getConversationUuid, conversationUuid)
                .orderByAsc(ChatConversationMessage::getCreateTime)
                .list();
        return messages;
    }
}
